package com.agan.agangame.dto;



import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author cg
 * @title: BaseResp
 * @description: 接口基础返回类
 * @date 2020/4/7 10:45 AM
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class BaseResp<T> {

    private String status;

    private String msg;

    private T data;

    public BaseResp(String status, String msg) {
        this.status=status;
        this.msg =msg;
    }


    public static BaseResp buildSuccess() {
        return new BaseResp(ReturnCodeEnum.SUCCESS.getCode(), ReturnCodeEnum.SUCCESS.getMessage());
    }


}
